package com.trkj.dao.wxy;

import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojo.StaffInformation;

public interface StaffInformationDao extends CrudRepository<StaffInformation, Long> {
	//单表分页
	@Query("from StaffInformation e")
	public List<StaffInformation> queryByPage(Pageable p);
	
	//多表查询分页
	@Query("select s,d,a from StaffInformation s inner join s.definitionDept d inner join s.admissions a")
	public List<Object[]> queryByOverViewStaff(Pageable p);
}
